home *** CD-ROM | disk | FTP | other *** search
- /*****************************************************************************
- * Default point/vector drawing routine common to graphics drivers. *
- * *
- * Written by: Gershon Elber Ver 0.1, June 1993. *
- *****************************************************************************/
-
- #include "irit_sm.h"
- #include "iritprsr.h"
- #include "cagd_lib.h"
- #include "iritgrap.h"
-
- /****************************************************************************
- * Draw a Point/Vector object using current modes and transformations. *
- ****************************************************************************/
- void IGDrawPtVec(IPObjectStruct *PObj)
- {
- static PointType
- Zero = { 0.0, 0.0, 0.0 };
- int i;
- PointType Ends[6];
- RealType
- *Pt = PObj -> U.Pt;
-
- IGSetColorObj(PObj);
-
- for (i = 0; i < 6; i++)
- PT_COPY(Ends[i], Pt);
-
- Ends[0][0] -= IG_POINT_WIDTH;
- Ends[1][0] += IG_POINT_WIDTH;
- Ends[2][1] -= IG_POINT_WIDTH;
- Ends[3][1] += IG_POINT_WIDTH;
- Ends[4][2] -= IG_POINT_WIDTH;
- Ends[5][2] += IG_POINT_WIDTH;
-
- for (i = 0; i < 6; i += 2) {
- IGMoveTo3D(Ends[i]);
- IGLineTo3D(Ends[i+1]);
- }
-
- if (IP_IS_VEC_OBJ(PObj)) {
- IGMoveTo3D(Pt);
- IGLineTo3D(Zero);
- }
- }
-